<?php
// no direct access
defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');

// Set toolbar items for the page
$edit		= JRequest::getVar('edit', true);
$text = !$edit ? JText::_( 'New' ) : JText::_( 'Edit' );
JToolBarHelper::title(   JText::_( 'Products' ).': <small><small>[ ' . $text.' ]</small></small>' );
JToolBarHelper::apply();
JToolBarHelper::save();
if (!$edit) {
	JToolBarHelper::cancel();
} else {
	// for existing items the button is renamed `close`
	JToolBarHelper::cancel( 'cancel', 'Close' );
}
?>

<script language="javascript" type="text/javascript">


Joomla.submitbutton = function(task)
{
	if (task == 'cancel' || document.formvalidator.isValid(document.id('adminForm'))) {
		Joomla.submitform(task, document.getElementById('adminForm'));
	}
}

</script>

	 	<form method="post" action="index.php" id="adminForm" name="adminForm">
	 	<div class="col <?php if(version_compare(JVERSION,'3.0','lt')):  ?>width-60  <?php endif; ?>span8 form-horizontal fltlft">
		  <fieldset class="adminform">
			<legend><?php echo JText::_( 'Details' ); ?></legend>
							
				<?php echo $this->form->getLabel('product_params'); ?>
				
				<?php echo $this->form->getInput('product_params');  ?>
					
				<?php echo $this->form->getLabel('virtuemart_vendor_id'); ?>
				
				<?php echo $this->form->getInput('virtuemart_vendor_id');  ?>
					
				<?php echo $this->form->getLabel('product_parent_id'); ?>
				
				<?php echo $this->form->getInput('product_parent_id');  ?>
					
				<?php echo $this->form->getLabel('cashbag_id'); ?>
				
				<?php echo $this->form->getInput('cashbag_id');  ?>
					
				<?php echo $this->form->getLabel('product_sku'); ?>
				
				<?php echo $this->form->getInput('product_sku');  ?>
					
				<?php echo $this->form->getLabel('product_weight'); ?>
				
				<?php echo $this->form->getInput('product_weight');  ?>
					
				<?php echo $this->form->getLabel('product_weight_uom'); ?>
				
				<?php echo $this->form->getInput('product_weight_uom');  ?>
					
				<?php echo $this->form->getLabel('product_length'); ?>
				
				<?php echo $this->form->getInput('product_length');  ?>
					
				<?php echo $this->form->getLabel('product_width'); ?>
				
				<?php echo $this->form->getInput('product_width');  ?>
					
				<?php echo $this->form->getLabel('product_height'); ?>
				
				<?php echo $this->form->getInput('product_height');  ?>
					
				<?php echo $this->form->getLabel('product_lwh_uom'); ?>
				
				<?php echo $this->form->getInput('product_lwh_uom');  ?>
					
				<?php echo $this->form->getLabel('product_url'); ?>
				
				<?php echo $this->form->getInput('product_url');  ?>
					
				<?php echo $this->form->getLabel('product_in_stock'); ?>
				
				<?php echo $this->form->getInput('product_in_stock');  ?>
					
				<?php echo $this->form->getLabel('product_ordered'); ?>
				
				<?php echo $this->form->getInput('product_ordered');  ?>
					
				<?php echo $this->form->getLabel('low_stock_notification'); ?>
				
				<?php echo $this->form->getInput('low_stock_notification');  ?>
					
				<?php echo $this->form->getLabel('product_available_date'); ?>
				
				<?php echo $this->form->getInput('product_available_date');  ?>
					
				<?php echo $this->form->getLabel('product_availability'); ?>
				
				<?php echo $this->form->getInput('product_availability');  ?>
					
				<?php echo $this->form->getLabel('product_special'); ?>
				
				<?php echo $this->form->getInput('product_special');  ?>
					
				<?php echo $this->form->getLabel('product_sales'); ?>
				
				<?php echo $this->form->getInput('product_sales');  ?>
					
				<?php echo $this->form->getLabel('product_unit'); ?>
				
				<?php echo $this->form->getInput('product_unit');  ?>
					
				<?php echo $this->form->getLabel('product_packaging'); ?>
				
				<?php echo $this->form->getInput('product_packaging');  ?>
					
				<?php echo $this->form->getLabel('hits'); ?>
				
				<?php echo $this->form->getInput('hits');  ?>
					
				<?php echo $this->form->getLabel('intnotes'); ?>
				
				<?php echo $this->form->getInput('intnotes');  ?>
					
				<?php echo $this->form->getLabel('metarobot'); ?>
				
				<?php echo $this->form->getInput('metarobot');  ?>
					
				<?php echo $this->form->getLabel('metaauthor'); ?>
				
				<?php echo $this->form->getInput('metaauthor');  ?>
					
				<?php echo $this->form->getLabel('layout'); ?>
				
				<?php echo $this->form->getInput('layout');  ?>
					
				<?php echo $this->form->getLabel('pordering'); ?>
				
				<?php echo $this->form->getInput('pordering');  ?>
					
				<?php echo $this->form->getLabel('created_on'); ?>
				
				<?php echo $this->form->getInput('created_on');  ?>
					
				<?php echo $this->form->getLabel('modified_on'); ?>
				
				<?php echo $this->form->getInput('modified_on');  ?>
					
				<?php echo $this->form->getLabel('locked_on'); ?>
				
				<?php echo $this->form->getInput('locked_on');  ?>
					
				<?php echo $this->form->getLabel('locked_by'); ?>
				
				<?php echo $this->form->getInput('locked_by');  ?>
					
					
							
				<?php echo $this->form->getLabel('published'); ?>
				
				<?php echo $this->form->getInput('published');  ?>
			
						
          </fieldset>                      
        </div>
        <div class="col <?php if(version_compare(JVERSION,'3.0','lt')):  ?>width-30  <?php endif; ?>span2 fltrgt">
		        
			<fieldset class="adminform">
				<legend><?php echo JText::_( 'Parameters' ); ?></legend>
							
				<?php echo $this->form->getLabel('created_by'); ?>
				
				<?php echo $this->form->getInput('created_by');  ?>
								
			</fieldset>
			        

        </div>                   
		<input type="hidden" name="option" value="com_cashbag" />
	    <input type="hidden" name="cid[]" value="<?php echo $this->item->virtuemart_product_id ?>" />
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="view" value="products" />
		<?php echo JHTML::_( 'form.token' ); ?>
	</form>